Optimal. Leaf size=135 \[ \frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {4 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {16 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3238, 3788, 3769, 3771, 2641, 4045, 2639} \[ \frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {4 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {16 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 3238
Rule 3769
Rule 3771
Rule 3788
Rule 4045
Rubi steps
\begin {align*} \int \frac {(a+a \cos (c+d x))^2}{\sqrt {\sec (c+d x)}} \, dx &=\int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\left (2 a^2\right ) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx+\int \frac {a^2+a^2 \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (2 a^2\right ) \int \sqrt {\sec (c+d x)} \, dx+\frac {1}{5} \left (8 a^2\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (2 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{5} \left (8 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {16 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {4 a^2 \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.51, size = 136, normalized size = 1.01 \[ \frac {a^2 \left (\frac {192 i \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i (c+d x)}\right )}{\sqrt {1+e^{2 i (c+d x)}}}-40 i \sqrt {1+e^{2 i (c+d x)}} \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};-e^{2 i (c+d x)}\right ) \sec (c+d x)+40 \sin (c+d x)+6 \sin (2 (c+d x))-96 i\right )}{30 d \sqrt {\sec (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}}{\sqrt {\sec \left (d x + c\right )}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\sqrt {\sec \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.75, size = 250, normalized size = 1.85 \[ -\frac {4 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, a^{2} \left (-12 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+32 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-12 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-13 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\sqrt {\sec \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int \frac {2 \cos {\left (c + d x \right )}}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int \frac {\cos ^{2}{\left (c + d x \right )}}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int \frac {1}{\sqrt {\sec {\left (c + d x \right )}}}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________